//引入axios
import axios from "../utils/utils";

//获取分类
export let catelist = (params)=>{
    return axios.get('/goods/catelist',{params})
}

//添加分类
export let addcate = (params)=>{
    return axios.post('/goods/addcate',params)
}

//修改分类
export let editcate = (params)=>{
    return axios.post('/goods/editcate',params)
}


//删除分类
export let delcate = (params)=>{
    return axios.get('/goods/delcate',{params})
}

//获取商品列表
export let list = (params)=>{
    return axios.get('/goods/list',{params})
}

//删除商品
export let goodsdel = (params)=>{
    return axios.get('/goods/del',{params})
}

//修改商品
export let goodsedit = (params)=>{
    return axios.post('/goods/edit',params)
}

//添加商品
export let goodsadd = (params)=>{
    return axios.post('/goods/add',params)
}

//商品分类
export let goodscategories = ()=>{
    return axios.get('/goods/categories',{})
}

